package org.crud4j.ejb3.example;

import javax.ejb.Local;
import javax.ejb.Stateless;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;

import org.crud4j.ejb3.Ejb3BeanProvider;

@Stateless(name = "crud4j/providers/ejb3")
@Local(Ejb3BeanProvider.class)
public class ExampleBeanProvider implements Ejb3BeanProvider {

	/**
	 * Classes supported by this provider
	 */
	private static Class[] CLASSES = new Class[] { Student.class, Teacher.class };

	@PersistenceUnit(name = "crud-test")
	private EntityManagerFactory emf;

	public EntityManagerFactory getEntityManagerFactory() {
		return emf;
	}

	public Class[] listClasses() {
		return CLASSES;
	}

}
